package com.lzy.permission.web;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lzy.permission.entity.User;
import com.lzy.permission.service.UserService;
import com.lzy.util.Page;

@Controller
@RequestMapping("/user")
public class UserController {

	private UserService userService ;
	
	@Autowired
	public void setUserService(UserService userService) {
		this.userService = userService;
	}
	
	@RequestMapping("/index")
	public String index(){
		return "permission/userIndex";
	}
	
	@RequestMapping("/add")
	public void add(){
		
	}
	
	@RequestMapping("/del")
	public void del(){
		
	}
	
	@RequestMapping("/update")
	public void update(){
		
	}
	
	@RequestMapping("/list")
	@ResponseBody
	public Page<User> list(){
		Page<User> page = userService.findPage();
		return page;
	}
	
}
